<template>
  <div class="page__bd" >
    <div class="weui-cells">
        <div class="weui-cell">
            <div class="weui-cell__bd">
                <h2>{{group.name}}</h2>
            </div>
        </div>
        <div class="weui-cell">
            <div class="title c-gray fs-s">班主任</div>
            <div style="width:fit-content;width:-webkit-fit-content;width:-moz-fit-content; text-align:center; margin-top:16rpx">
            <image style="width: 80rpx; hieght:80rpx; border-radius:50%" :src="loginer.avatarUrl" mode="widthFix"></image>
            <div class="nickname fs-s">{{loginer.nickName}}</div>
            <div class="title c-gray fs-s mgt-l">学生 0人</div>
            </div>
        </div>
    </div>

    <div class="ta-c pdt c-gray">暂时没有学生哦</div>
    <div class="fix-bottom btn-half-group">
      <div class="btn-half fl">
        <button class="ui btn secondary" @tap="gotoIndex">布置作业</button>
      </div>
      <div class="btn-half fl">
        <button class="ui btn primary fixed" open-type="share">发送班级邀请</button>
      </div>
    </div>
  </div>
</template>

<script>
import { mapGetters, mapActions } from 'vuex'

export default{
  data () {
    return {
    }
  },
  methods: {
    gotoIndex () {
      wx.redirectTo({
        url: '/pages/documents/main?firstLogin=true'
      })
    }
  },
  onShareAppMessage () {
    return {
      title: this.group.name + '邀请你加入！',
      path: '/pages/group-invite/main?groupId=' + this.group.id
    }
  },
  computed: {
    ...mapGetters([
      'loginer'
    ]),
    ...mapGetters('group', [
      'group'
    ])
  }
}
</script>

<style>
    .s-line{
        margin: 0 30rpx;
    }
    h2{
        font-weight: bold;
        font-size:36rpx;
    }
    .weui-cell{
        display: block;
    }
</style>
